LassoScript Utility
Basics Browse Detail

[String->TitleCase]

Tag Link [String->TitleCase] Category String
Type Member Source Available No
Support Preferred Version 7.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0

Description

[String->TitleCase] modifies the base string in-place by converting the first character in each word of the string to uppercase and all other characters in the string to lowercase.

Syntax

[Variable: 'myString' = 'String Value']
[$myString->(TitleCase)]
[Variable: 'myString']

<?LassoScript
Variable: 'myString' = 'String Value';
$myString->(TitleCase)]
Output: $myString;
?>

Parameters

No Parameters Required.

Examples

To change the case of a string to title case:

Use the [String->TitleCase] tag. The following example outputs a sample string converted to title case.

[Variable: 'myString' = 'A quick brown fox']
[$myString->TitleCase]
[Output: $myString]

A Quick Brown Fox

Related Tags

Category Tags